package com.atguigu.gmall.item.client;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.item.client.impl.ItemDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @program: gmall-parent
 * @author: Mr.Zhuo
 * @create: 2022-04-06 11:33
 **/
@FeignClient(value = "service-item", fallback = ItemDegradeFeignClient.class)
public interface ItemFeignClient {

    /**
     *  根据skuId  查询sku商品详细信息
     * @param skuId
     * @return
     */
    @GetMapping("/api/item/{skuId}")
    public Result<Map> getBySkuId(@PathVariable Long skuId);
}
